import hasRole from './hasRole'
import hasPermi from './hasPermi'
import excludeRole from "./excludeRole"
import isRoleEqualTop from "./isRoleEqualTop"

const install = function (Vue) {
  Vue.directive('hasRole', hasRole)
  Vue.directive('hasPermi', hasPermi)
  Vue.directive('excludeRole', excludeRole)
  Vue.directive('isRoleEqualTop', isRoleEqualTop)
}

if (window.Vue) {
  window['hasRole'] = hasRole
  window['hasPermi'] = hasPermi
  window['excludeRole'] = excludeRole
  window['isRoleEqualTop'] = isRoleEqualTop
  Vue.use(install); // eslint-disable-line
}

export default install
